<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>循环显示1-100</title>
    <style>
        a{
            color: #c01900;
            text-decoration: none;
        }
    </style>
</head>
<body>
<a href="循环质数.html">循环质数</a>
<br/>
<br/>
<script>
    var i=1;
    while (i<=100){
        if (i<10){
            document.write("0"+i+" ");
        }else {
            document.write(i+" ");
        }
        if (i%10==0){
            document.write("<br/>");
        }
        i++;
    }
</script>
</body>
</html>